#include <rtthread.h>
#include "mem.h"
static void ad_sample(int argc, char**argv)
{
  float value;
  ram_read(ADC_VALUE_CHANNEL1, &value, 4);
  rt_kprintf("VOLTAGE INPUT 1: %d.%d V\n", (int)value, (int)(value*1000)%1000);
  ram_read(ADC_VALUE_CHANNEL2, &value, 4);
  rt_kprintf("VOLTAGE INPUT 2: %d.%d V\n", (int)value, (int)(value*1000)%1000);
  ram_read(ADC_VALUE_CHANNEL3, &value, 4);
  rt_kprintf("VOLTAGE INPUT 3: %d.%d V\n", (int)value, (int)(value*1000)%1000);
  ram_read(ADC_VALUE_CHANNEL4, &value, 4);
  rt_kprintf("VOLTAGE INPUT 4: %d.%d V\n", (int)value, (int)(value*1000)%1000);
  return;
}
MSH_CMD_EXPORT(ad_sample, Display ADC conversion result);
